:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --dark: #2d3436;
    --light: #f5f6fa;
    --accent: #fd79a8;
    --success: #00b894;
    --warning: #fdcb6e;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--light);
    min-height: 100vh;
    padding-bottom: 40px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 20px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light);
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.7);
}

.logo i {
    color: var(--primary);
}

.tagline {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* 筛选区域样式 */
.filter-section {
    background: rgba(45, 52, 54, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--light);
    font-size: 1.4rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.9); /* 优化背景色 */
    color: #2d3436; /* 优化字体颜色 */
    font-size: 1rem;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

/* 下拉选项样式 */
.filter-group select option {
    background: rgba(255, 255, 255, 0.95); /* 选项背景 */
    color: #2d3436; /* 选项文字 */
}

.filter-group input::placeholder {
    color: rgba(45, 52, 54, 0.7); /* 优化placeholder颜色 */
}

.filter-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

/* 陪玩卡片区域样式 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--dark);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.game-type {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.service-type {
    background: rgba(253, 121, 168, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.card-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--success);
    margin: 10px 0;
}

.price-unit {
    font-size: 1rem;
    color: #777;
    font-weight: normal;
}

.card-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.voice-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(162, 155, 254, 0.1);
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--secondary);
}

.voice-info {
    flex-grow: 1;
    font-size: 0.9rem;
    color: var(--dark);
}

.voice-info p {
    color: #777;
    font-size: 0.8rem;
    margin-top: 3px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.view-details {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-details:hover {
    background: var(--secondary);
}

.rating {
    color: var(--warning);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 详情模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--dark);
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    color: #777;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.modal-price {
    font-size: 2rem;
    color: var(--success);
    font-weight: 700;
    margin: 10px 0;
}

.modal-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-image {
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.detail-value {
    color: #555;
    line-height: 1.6;
}

.modal-voice {
    background: rgba(162, 155, 254, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 10px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    border-radius: 0 0 15px 15px;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    .filter-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .logo {
        font-size: 2rem;
    }
}

/* 添加服务按钮样式 */
#add-service-btn {
    position: absolute;
    top: 30px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1rem;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    color: var(--dark);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 文件上传样式 */
.file-upload {
    margin-top: 8px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-preview-item {
    background: rgba(162, 155, 254, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* 添加服务模态框样式优化 */
#add-service-modal .modal-content {
    background: rgba(45, 52, 54, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 92, 231, 0.5);
    color: #f5f6fa;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 25px;
}

#add-service-modal .modal-title {
    color: #a29bfe;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(162, 155, 254, 0.3);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

#add-service-modal .form-group {
    margin-bottom: 20px;
}

#add-service-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a29bfe;
}

#add-service-modal select,
#add-service-modal input,
#add-service-modal textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(108, 92, 231, 0.3);
    background: rgba(255, 255, 255, 0.9); /* 优化背景色 */
    color: #2d3436; /* 优化字体颜色 */
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* 下拉选项样式 */
#add-service-modal select option {
    background: rgba(255, 255, 255, 0.95); /* 选项背景 */
    color: #2d3436; /* 选项文字 */
}

#add-service-modal select:focus,
#add-service-modal input:focus,
#add-service-modal textarea:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
    outline: none;
}

#add-service-modal textarea {
    min-height: 120px;
    resize: vertical;
}

#add-service-modal .file-upload {
    margin-top: 10px;
}

#add-service-modal .file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

#add-service-modal .image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

#add-service-modal .image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#add-service-modal .audio-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(108, 92, 231, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    width: 100%;
}

#add-service-modal .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(253, 121, 168, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

#add-service-modal .remove-file:hover {
    background: rgba(253, 121, 168, 1);
    transform: scale(1.1);
}

#add-service-modal .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

#add-service-modal .btn {
    flex: 1;
    padding: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

#add-service-modal .btn-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

#add-service-modal .btn-outline {
    background: transparent;
    color: #a29bfe;
    border: 1px solid #a29bfe;
}

#add-service-modal .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

#add-service-modal .btn i {
    margin-right: 8px;
}

/* 修改成功提示样式 */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 184, 148, 0.9);
    color: white;
    padding: 12px 20px; /* 减小内边距 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px; /* 减小间距 */
    z-index: 10000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    max-width: 300px; /* 限制最大宽度 */
    font-size: 14px; /* 减小字体大小 */
}

/* 修改错误提示样式 */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 12px 20px; /* 减小内边距 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px; /* 减小间距 */
    z-index: 10000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    max-width: 300px; /* 限制最大宽度 */
    font-size: 14px; /* 减小字体大小 */
}

/* 调整图标大小 */
.success-toast i, .error-toast i {
    font-size: 18px; /* 减小图标大小 */
}

@keyframes fadeIn {
    from { opacity: 0; bottom: 0; }
    to { opacity: 1; bottom: 20px; }
}